Skip to content
Browse files

http.c: raise error if bucket is not connected

Change-Id: I21782cad7fa8d5f74ac950033899515fc7f1b9bd
Reviewed-on: http://review.couchbase.org/23536
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  • Loading branch information...
1 parent 7baeb69 commit 7b6069033de7f2659aca35f143328c0efe68f149 @funny-falcon funny-falcon committed with avsej Dec 24, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 ext/couchbase_ext/http.c
View
4 ext/couchbase_ext/http.c
@@ -292,6 +292,10 @@ cb_http_request_perform(VALUE self)
lcb_error_t err;
struct cb_bucket_st *bucket = req->bucket;
+ if (bucket->handle == NULL) {
+ rb_raise(cb_eConnectError, "closed connection");
+ }
+
ctx = cb_context_alloc(bucket);
ctx->rv = Qnil;
ctx->proc = rb_block_given_p() ? rb_block_proc() : req->on_body_callback;

0 comments on commit 7b60690

Please sign in to comment.
Something went wrong with that request. Please try again.