Permalink
Browse files

logs removal & cleanup

  • Loading branch information...
Raynos committed Aug 15, 2012
1 parent c7c8b76 commit 11cd9ecd4ec177f8c3e65dea3897c8419250239e
Showing with 2 additions and 14 deletions.
  1. +0 −10 browser.js
  2. +0 −2 lib/handleClient.js
  3. +2 −2 lib/handleServer.js
View
@@ -40,12 +40,9 @@ function createServer(mdm, options, callback) {
, stream = mdm.createStream(prefix + "/client/" + name +
"/" + id)
- console.log("opening", id)
-
writable.pipe(stream).pipe(readable)
stream.once("ended", function () {
- console.log("client-stream did not end")
stream.end()
})
@@ -58,7 +55,6 @@ function createServer(mdm, options, callback) {
if (code === "404" && message === "server does not exist") {
tryAgain--
- console.log('server does not exist', tryAgain)
if (tryAgain === 0) {
return proxy.emit("error", err)
}
@@ -92,8 +88,6 @@ function createServer(mdm, options, callback) {
return stream
function openServerConnection(clientName) {
- console.log("request to open", clientName)
-
// for each client message that comes up create a proxy stream
// and return it
var writable = PauseStream().pause()
@@ -112,12 +106,9 @@ function createServer(mdm, options, callback) {
, stream = mdm.createStream(prefix + "/server/" + name +
"/client/" + clientName + "/" + id)
- console.log("opening", id)
-
// Boot server says the relay server disconnected.
// Clean up open streams
stream.once("ended", function () {
- console.log("ending server", id)
stream.purge && stream.purge()
stream.end()
})
@@ -135,7 +126,6 @@ function createServer(mdm, options, callback) {
"server connection"
) {
tryAgain--
- console.log('client does not exist', tryAgain, id)
if (tryAgain === 0) {
return proxy.emit("error", err)
}
View
@@ -28,8 +28,6 @@ function handleClient(stores, stream, params, counter) {
store.set(clientName, buffer)
- console.log("handling client", clientName)
-
serverStream.write(clientName)
stream.once("end", onend)
View
@@ -12,8 +12,8 @@ function handleServer(stores, proxy, stream, params) {
stream.error({
code: "500"
, library: "[stream-server]"
- , message: "server already exists: " + serverName
- , trace: console.trace()
+ , message: "server already exists"
+ , details: serverName
})
return stream.end()
}

0 comments on commit 11cd9ec

Please sign in to comment.