Created
May 19, 2011 20:01
-
-
Save przemek-pokrywka/981598 to your computer and use it in GitHub Desktop.
A quick-hack-dirty-fix for Smile hanging threads' problem described at https://github.com/robey/kestrel/issues/26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index 2cb9192..42bea4b 100644 | |
--- a/src/main/scala/net/lag/smile/MemcacheConnection.scala | |
+++ b/src/main/scala/net/lag/smile/MemcacheConnection.scala | |
@@ -119,7 +119,7 @@ class MemcacheConnection(val hostname: String, val port: Int, val weight: Int) { | |
@throws(classOf[MemcacheServerException]) | |
def store(query: String, key: String, value: Array[Byte], flags: Int, expiry: Int): Boolean = { | |
- serverActor !? Store(query, key, flags, expiry, value) match { | |
+ serverActor.!?(20 * 1000l, Store(query, key, flags, expiry, value)).getOrElse(Error("Unable to send message to server due to a temporary local problem")) match { | |
case Timeout => | |
registerFailure() | |
throw new MemcacheServerTimeout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment