clear remote ID on subsequent non-conntected requests and on disconnect
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 18 Dec 2008 14:16:12 +0000 (14:16 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 18 Dec 2008 14:16:12 +0000 (14:16 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1534 9efc2488-bf62-4759-914b-345cdb29e865

src/javascript/opensrf.js

index 07aacdd..315c080 100644 (file)
@@ -139,11 +139,15 @@ OpenSRF.ClientSession.prototype.disconnect = function(args) {
             'type' : OSRF_MESSAGE_TYPE_DISCONNECT,
         })
     );
+    this.remote_id = null;
 }
 
 
 OpenSRF.ClientSession.prototype.request = function(args) {
-
+    
+    if(this.state != OSRF_APP_SESSION_CONNECTED)
+        this.remote_id = null;
+        
     if(typeof args == 'string') { 
         params = [];
         for(var i = 1; i < arguments.length; i++)