git.iko.soy/distributed-process
on master help sign in
Avoid name clash. Clarify error message.
e22c690Edsko de Vries
distributed-process-azure/src/Control/Distributed/Process/Backend/Azure.hs+3−3
@@ -792,7 +792,7 @@ localExpect = LocalProcess $ do
792 isE <- readIntChannel ch
792 isE <- readIntChannel ch
793 len <- readIntChannel ch
793 len <- readIntChannel ch
794 lenAgain <- readIntChannel ch
794 lenAgain <- readIntChannel ch
795− when (len /= lenAgain) $ throwIO (userError "Protocol violation")
795+ when (len /= lenAgain) $ throwIO (userError "Internal error: protocol violation (perhaps the remote binary is not installed correctly?)")
796 msg <- readSizeChannel ch len
796 msg <- readSizeChannel ch len
797 if isE /= 0
797 if isE /= 0
798 then error (decode msg)
798 then error (decode msg)
@@ -939,7 +939,7 @@ instance Binary ServiceProcessMsg where
939serviceProcess :: Backend -> Process ()
939serviceProcess :: Backend -> Process ()
940serviceProcess _backend = do
940serviceProcess _backend = do
941 us <- getSelfPid
941 us <- getSelfPid
942− register "serviceProcess" us
942+ register "$azureBackendServiceProcess" us
943 go
943 go
944 where
944 where
945 go = do
945 go = do
@@ -958,7 +958,7 @@ spawnNodeOnVM backend vm port =
958
958
959-- | Terminate a node started with 'spawnNodeOnVM'
959-- | Terminate a node started with 'spawnNodeOnVM'
960terminateNode :: NodeId -> Process ()
960terminateNode :: NodeId -> Process ()
961−terminateNode nid = nsendRemote nid "serviceProcess" ServiceProcessTerminate
961+terminateNode nid = nsendRemote nid "$azureBackendServiceProcess" ServiceProcessTerminate
962
962
963__remoteTable :: RemoteTable -> RemoteTable
963__remoteTable :: RemoteTable -> RemoteTable
964__remoteTable = registerStatic "serviceProcess" (toDynamic serviceProcess)
964__remoteTable = registerStatic "serviceProcess" (toDynamic serviceProcess)